﻿using IGS.Core.Systems;

namespace IGS.Core.Integrators
{
    public abstract class BaseIntegrator : IIntegrator
    {
        public void Predict(INBodySystem system, double dt)
        {
            foreach (var body in system)
                Predict(body, dt);
        }

        public void Correct(INBodySystem system, double dt)
        {
            foreach (var body in system)
                Correct(body, dt);
        }

        public abstract void Predict(IInteractable body, double dt);
        public abstract void Correct(IInteractable body, double dt);
    }
}